#ifndef STARSHIP_H
#define STARSHIP_H
#include <QPainter>
#include <QObject>
#include <QPixmap>
#include <QPoint>
#include <QPixmap>
#include "bullet.h"
class Starship : public QObject
{
    Q_OBJECT
public:
    Starship(qint32, qint32);
    void draw (QPainter *painter);
private:
    qint32 m_x,m_y;
    qint32 m_curX,m_curY;//координаты курсора
    Bullet *bullet;
    double m_angleInRads;
    double m_angle;
    QPixmap m_pixmap;
    //double angle;
    static const QPixmap picture;
    void rotate(qint32 toX, qint32 toY);
public slots:
    void updateLocation(qint32 x, qint32 y);
    void receiptCursor (qint32 x, qint32 y); //получение координат курсора
signals:
    void transmitGeoData (qint32 x, qint32 y, double angle);
    void transmitShipInfo (qint32 x, qint32 y, double angle);
};

#endif // STARSHIP_H
